<template>
  <el-upload
    class="avatar-uploader"
    :http-request="handleImport"
    :show-file-list="false"
  >
    <el-icon class="avatar-uploader-icon"><Plus /></el-icon>
    导入Excel
  </el-upload>
  <div ref="cont"></div>
</template>

<script>
import { excelImport } from "../../utils/excel-sdk";
export default {
  methods: {
    handleImport(info) {
      console.log(info);
      let json = excelImport(info.file, this.$refs.cont);
      console.log(json);
    },
  },
};
</script>

<style lang="scss" scoped></style>
